package com.ruoyi.common.enums;

/**
 * 方案状态
 * 
 * @author ruoyi
 */
public enum PlanStatus
{
    NotEffective("0", "未生效"),
    Effective("1", "已生效"),
    ;

    private final String code;
    private final String info;

    PlanStatus(String code, String info)
    {
        this.code = code;
        this.info = info;
    }

    public String getCode()
    {
        return code;
    }

    public String getInfo()
    {
        return info;
    }


    public static PlanStatus organTypeOf(String code) {
        for(PlanStatus actionEnum : values()){
            if(actionEnum.getCode().equals(code)){
                return actionEnum;
            }
        }
        throw new RuntimeException("没有找到对应的枚举");
    }
}
